import request from '@/config/axios'

export interface TenantRechargeLogVO {
  id: number
  amount: number
  payType: number
  remark: string
  ownerUserId: number
  attachment: string
}

// 查询租户充值记录列表
export const getTenantRechargeLogPage = async (params) => {
  return await request.get({ url: `/system/tenant-recharge-log/page`, params })
}

// 查询租户充值记录详情
export const getTenantRechargeLog = async (id: number) => {
  return await request.get({ url: `/system/tenant-recharge-log/get?id=` + id })
}

// 新增租户充值记录
export const createTenantRechargeLog = async (data: TenantRechargeLogVO) => {
  return await request.post({ url: `/system/tenant-recharge-log/create`, data })
}

// 修改租户充值记录
export const updateTenantRechargeLog = async (data: TenantRechargeLogVO) => {
  return await request.put({ url: `/system/tenant-recharge-log/update`, data })
}

// 删除租户充值记录
export const deleteTenantRechargeLog = async (id: number) => {
  return await request.delete({ url: `/system/tenant-recharge-log/delete?id=` + id })
}

// 导出租户充值记录 Excel
export const exportTenantRechargeLog = async (params) => {
  return await request.download({ url: `/system/tenant-recharge-log/export-excel`, params })
}

// ====================== 超管模式
// 查询租户充值记录列表
export const getTenantRechargeLogPageByAdmin = async (params) => {
  return await request.get({ url: `/system/tenant-recharge-log/page-by-admin`, params })
}
